{% extends 'ProjResManBundle::layout.html.twig' %}

{% block title %}ProjResManBundle:HeadMaster:projects{% endblock %}

{% block content %}
<div id="page_content">
    <div id="submenu">
        <div id="submenu_float1">
            <div id="submenu_float2">
                <ul>
                    <ul class="submenu_option">
                        <a href="../index/resources">
                            <li class="submenu_header">Resurse</li>
                            <li class="submenu_details">Resurse umane si logistice</li>
                        </a>
                    </ul>
                    <ul class="submenu_option">
                        <a href="../index/projects">
                            <li class="submenu_header">Proiecte</li>
                            <li class="submenu_details">Proiectele departamentului</li>
                        </a>
                    </ul>
                    <ul class="submenu_option">
                        <a href="../index/activities">
                            <li class="submenu_header">Activitati</li>
                            <li class="submenu_details">Calendarul activitatilor</li>
                        </a>
                    </ul>
                </ul>
            </div>
        </div>
    </div>
        
    <div id="container">
        <table class="table table-hover">
            <thead>
                 <tr>
                    <th>#</th>
                    <th>Nume</th>
                    <th>Descriere</th>
                    <th>Data inceperii</th>
                    <th>Data finalizarii</th>
                    <th>State</th>
                    <th>Departament</th>
                    <th>Creation Date</th>
                    <th>Update</th>
                    <th>Delete</th>
                </tr>
            </thead>
            <tbody>
                {% for project in projects %}
                    <tr>
                        <td>{{ project.id }}</td>
                        <td>{{ project.name }}</td>
                        <td>{{ project.description }}</td>
                        <td>{{ project.startDate|date('Y-m-d') }}</td>
                        <td>{{ project.endDate|date('Y-m-d') }}</td>
                        <td>{{ project.state }}</td>
                        <td>{{ project.department }}</td>
                        <td>{{ project.creationDate|date('Y-m-d H:i:s') }}</td>
                        <td>{{ project.approved }}</td>
                        <td>
                            <button type="button" class="btn btn-info">Update</button>
                        </td>
                        <td>
                            <a href="{{ path('headmaster_projects_delete') }}?project_id={{ project.id}}">
                                <button type="button" class="btn btn-info">Delete</button>
                            </a>
                        </td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
</div>
<div>    
        <a href="{{ path('headmaster_projects_add') }}">Add new project</a>
</div>

    
{% endblock %}
